openconnect: openconnect-wrapper: rewrite
authorYousong Zhou <[email protected]>
Mon, 8 May 2017 05:07:47 +0000 (13:07 +0800)
committerYousong Zhou <[email protected]>
Mon, 19 Jun 2017 04:37:24 +0000 (12:37 +0800)
commitdbc36c30921220ed9d66e54f7773b8fdb1ea5ecc
treeef59c18d70cef35e8eda8083b2a8f66922e84cbb
parentcd79492ae2700b7ab0b36148211031f6e9185f72
openconnect: openconnect-wrapper: rewrite

 - use exec directly to eliminate a level in the process tree
 - use "$@" instead of "$*" to pass arguments to openconnect

According to openconnect(8), openconnect will call vpnc-script to
cleanup before quit when it received SIGINT(2) and will quit immediately
when it received SIGTERM (the default signal by kill command)

Before and after the change, openconnect process will be killed first
with SIGINT sent from netifd.  This was decided by the
'proto_kill_command "$config" 2' notify call in the proto script.

SIGKILL is the only other signal that can be sent from netifd when the
process did not quit on SIGINT on time.  There should be no need to trap
on signal 1 3 6 9 (HUP QUIT ABRT KILL)

Signed-off-by: Yousong Zhou <[email protected]>
net/openconnect/Makefile
net/openconnect/files/openconnect-wrapper